import request from '@/utils/request'

// 交易所
/*
 * 交易所全列表
 */
export function exchangeGetOption(data) {
  return request({
    url: '/exchange/getOption',
    method: 'post',
    data
  })
}
/*
 * 交易所列表
 */
export function exchangeList(params) {
  return request({
    url: '/exchange/list',
    method: 'get',
    params
  })
}
/*
 * 交易所新增
 */
export function exchangeSave(data) {
  return request({
    url: '/exchange/save',
    method: 'post',
    data
  })
}
/*
 * 交易所详情
 */
export function exchangeInfo(id) {
  return request({
    url: `/exchange/info/${id}`,
    method: 'post'
  })
}
/*
 * 交易所编辑
 */
export function exchangeUpdate(data) {
  return request({
    url: '/exchange/update',
    method: 'post',
    data
  })
}
/*
 * 交易所删除
 */
export function exchangeDelete(data) {
  return request({
    url: '/exchange/delete',
    method: 'post',
    data
  })
}
/*
 * 导出交易所
 */
export function exchangeExport(params) {
  return request({
    url: '/exchange/export',
    method: 'get',
    params
  })
}

// 品种管理
/*
 * 品种全列表
 */
export function exchangecommodityGetOption(data) {
  return request({
    url: '/exchangecommodity/getOption',
    method: 'post',
    data
  })
}
/*
 * 品种强平列表
 */
export function exchangecommodityGetRiskOption(id) {
  return request({
    url: `/exchangecommodity/getRiskOption/${id}`,
    method: 'post'
  })
}
/*
 * 品种列表
 */
export function exchangecommodityList(params) {
  return request({
    url: '/exchangecommodity/list',
    method: 'get',
    params
  })
}
/*
 * 品种新增
 */
export function exchangecommoditySave(data) {
  return request({
    url: '/exchangecommodity/save',
    method: 'post',
    data
  })
}
/*
 * 品种详情
 */
export function exchangecommodityInfo(id) {
  return request({
    url: `/exchangecommodity/info/${id}`,
    method: 'post'
  })
}
/*
 * 品种编辑
 */
export function exchangecommodityUpdate(data) {
  return request({
    url: '/exchangecommodity/update',
    method: 'post',
    data
  })
}
/*
 * 品种删除
 */
export function exchangecommodityDelete(data) {
  return request({
    url: '/exchangecommodity/delete',
    method: 'post',
    data
  })
}
/*
 * 导出品种
 */
export function exchangecommodityExport(params) {
  return request({
    url: '/exchangecommodity/export',
    method: 'get',
    params
  })
}

// 合约管理
/*
 * 合约全列表
 */
export function exchangecontractGetOption(data) {
  return request({
    url: '/exchangecontract/getOption',
    method: 'post',
    data
  })
}
/*
 * 行情源列表
 */
export function market_source(params) {
  return request({
    url: '/sys-dict-data/type/market_source',
    method: 'get',
    params
  })
}
/*
 * 合约列表
 */
export function exchangecontractList(params) {
  return request({
    url: '/exchangecontract/list',
    method: 'get',
    params
  })
}
/*
 * 合约新增
 */
export function exchangecontractSave(data) {
  return request({
    url: '/exchangecontract/save',
    method: 'post',
    data
  })
}
/*
 * 合约详情
 */
export function exchangecontractInfo(id) {
  return request({
    url: `/exchangecontract/info/${id}`,
    method: 'post'
  })
}
/*
 * 合约编辑
 */
export function exchangecontractUpdate(data) {
  return request({
    url: '/exchangecontract/update',
    method: 'post',
    data
  })
}
/*
 * 合约删除
 */
export function exchangecontractDelete(data) {
  return request({
    url: '/exchangecontract/delete',
    method: 'post',
    data
  })
}
/*
 * 导出合约
 */
export function exchangecontractExport(params) {
  return request({
    url: '/exchangecontract/export',
    method: 'get',
    params
  })
}

// 币种设置
/*
 * 币种列表
 */
export function currencyList(params) {
  return request({
    url: '/currency/list',
    method: 'get',
    params
  })
}
/*
 * 币种新增
 */
export function currencySave(data) {
  return request({
    url: '/currency/save',
    method: 'post',
    data
  })
}
/*
 * 币种详情
 */
export function currencyInfo(id) {
  return request({
    url: `/currency/info/${id}`,
    method: 'post'
  })
}
/*
 * 币种编辑
 */
export function currencyUpdate(data) {
  return request({
    url: '/currency/update',
    method: 'post',
    data
  })
}
/*
 * 币种删除
 */
export function currencyDelete(data) {
  return request({
    url: '/currency/delete',
    method: 'post',
    data
  })
}
/*
 * 导出币种
 */
export function currencyExport(params) {
  return request({
    url: '/currency/export',
    method: 'get',
    params
  })
}

/*
 * 币种全列表
 */
export function currencyGetOption(data) {
  return request({
    url: '/currency/getOption',
    method: 'post',
    data
  })
}

// 汇率设置
/*
 * 汇率列表
 */
export function currencyrateList(params) {
  return request({
    url: '/currencyrate/list',
    method: 'get',
    params
  })
}
/*
 * 汇率新增
 */
export function currencyrateSave(data) {
  return request({
    url: '/currencyrate/save',
    method: 'post',
    data
  })
}
/*
 * 汇率详情
 */
export function currencyrateInfo(id) {
  return request({
    url: `/currencyrate/info/${id}`,
    method: 'post'
  })
}
/*
 * 汇率编辑
 */
export function currencyrateUpdate(data) {
  return request({
    url: '/currencyrate/update',
    method: 'post',
    data
  })
}
/*
 * 汇率删除
 */
export function currencyrateDelete(data) {
  return request({
    url: '/currencyrate/delete',
    method: 'post',
    data
  })
}
/*
 * 导出汇率
 */
export function currencyrateExport(params) {
  return request({
    url: '/currencyrate/export',
    method: 'get',
    params
  })
}

// 接口类型管理
/*
 * 接口类型管理全列表
 */
export function interfacetypeGetOption(params) {
  return request({
    url: '/sys-dict-data/type/interface_type',
    method: 'get',
    params
  })
}
/*
 * 接口类型管理列表
 */
export function interfacetypeList(params) {
  return request({
    url: '/interfacetype/list',
    method: 'get',
    params
  })
}
/*
 * 接口类型管理新增
 */
export function interfacetypeSave(data) {
  return request({
    url: '/interfacetype/save',
    method: 'post',
    data
  })
}
/*
 * 接口类型管理详情
 */
export function interfacetypeInfo(id) {
  return request({
    url: `/interfacetype/info/${id}`,
    method: 'post'
  })
}
/*
 * 接口类型管理编辑
 */
export function interfacetypeUpdate(data) {
  return request({
    url: '/interfacetype/update',
    method: 'post',
    data
  })
}
/*
 * 接口类型管理删除
 */
export function interfacetypeDelete(data) {
  return request({
    url: '/interfacetype/delete',
    method: 'post',
    data
  })
}
/*
 * 导出接口类型管理
 */
export function interfacetypeExport(params) {
  return request({
    url: '/interfacetype/export',
    method: 'get',
    params
  })
}

// 期货商管理
/*
 * 期货商列表
 */
export function futuresmerchantList(params) {
  return request({
    url: '/futuresmerchant/list',
    method: 'get',
    params
  })
}
/*
 * 期货商新增
 */
export function futuresmerchantSave(data) {
  return request({
    url: '/futuresmerchant/save',
    method: 'post',
    data
  })
}
/*
 * 期货商详情
 */
export function futuresmerchantInfo(id) {
  return request({
    url: `/futuresmerchant/info/${id}`,
    method: 'post'
  })
}
/*
 * 期货商编辑
 */
export function futuresmerchantUpdate(data) {
  return request({
    url: '/futuresmerchant/update',
    method: 'post',
    data
  })
}
/*
 * 期货商删除
 */
export function futuresmerchantDelete(data) {
  return request({
    url: '/futuresmerchant/delete',
    method: 'post',
    data
  })
}
/*
 * 导出期货商
 */
export function futuresmerchantExport(params) {
  return request({
    url: '/futuresmerchant/export',
    method: 'get',
    params
  })
}

/*
 * 根据类型获取字典数据
 */
export function getDictData(dictType) {
  return request({
    url: `/sys-dict-data/type/${dictType}`,
    method: 'get'
  })
}


